﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using BusinessLayer;

namespace WebAPI.Controllers
{
    public class BookController : ApiController
    {
        // GET api/book
        public IEnumerable<string> Get()
        {
            return new string[] { "value1", "value2" };
        }

        // GET api/book/5
        public List<Book> Get(string id)
        {
            return BusinessLayer.Book.getByISBNorTitle("Title", Uri.UnescapeDataString(id));
        }

        public List<Book> Get(string val, string id)
        {

            return BusinessLayer.Book.getByISBNorTitle(Uri.UnescapeDataString(val), Uri.UnescapeDataString(id));
        }

        // POST api/book
        public void Post([FromBody]string value)
        {
        }

        // PUT api/book/5
        public void Put(int id, [FromBody]string value)
        {
        }

        // DELETE api/book/5
        public void Delete(int id)
        {
        }
    }
}
